package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class NormDoubleArray {
	public static double norm(double[] data) {
		return (Math.sqrt(sumSquares(data)));
	}

	private static double sumSquares(double[] data) {
		double ans = 0.0;
		for (double aData : data) {
			ans += aData * aData;
		}
		return (ans);
	}

}
